﻿using DroidClaim.Service.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DroidClaimBL.Dto
{
    public class ClaimInfoBlDto
    {
        public int Id { get; set; }
        public DateTime AccDate { get; set; }
        public string AccidentLocation { get; set; }
        public double Latitude { get; set; }
        public double Longitude { get; set; }
        public DateTime UpdateDate { get; set; }
        public int Status { get; set; }
        public string LicensePlateNo { get; set; }
        public string SurvName { get; set; }
        public string SurvMobile { get; set; }
        public string SurvImg { get; set; }

        public ClaimInfoBlDto()
        {
        }

        public ClaimInfoBlDto(ClaimInfoDto svDto)
        {
            Id = svDto.Id;
            AccDate = svDto.AccidentDate;
            AccidentLocation = svDto.AccidentLocation;
            Latitude = svDto.Longitude;
            Longitude = svDto.Longitude;
            UpdateDate = svDto.UpdateDate;
            Status = svDto.ClaimStatus.Id;
            LicensePlateNo = svDto.Customer.LicensePlate;
            SurvName = "";
            SurvMobile = "";
            SurvImg = "";
            if (svDto.Surveyor != null)
            {
                SurvName = svDto.Surveyor.Name + " " + svDto.Surveyor.Surname;
                SurvMobile = svDto.Surveyor.Mobile;
                SurvImg = svDto.Surveyor.PicturePath;
            }
        }
    }
}